/*
 * File:   DetailDef.h
 * Author: Elevator
 *
 * Created on July 14, 2013, 4:45 PM
 */

#ifndef DATA_DETAILDEF_H
#define DATA_DETAILDEF_H

#include <string>
#include "Common/Common.h"
#include "Texture.h"

namespace data {

	class DetailDef {
	public:
		DetailDef(
			std::string name,
			std::string description,
			Texture texture,
			float mass,
			float inertia,
			float friction,
			float restitution ) :
		_name( name ),
		_description( description ),
		_texture(texture),
		_mass( mass ),
		_inertia( inertia ),
		_friction( friction ),
		_restitution( restitution )
		{
			_vertices = new Vector<Circle>();
		}

		~DetailDef()
		{
            delete _vertices;
		}

		inline const std::string GetName( ) const { return _name; }
		inline void SetName( std::string name ) { _name = name; }

		inline const std::string GetDescription( ) const { return _description; }
		inline void SetDescription( std::string description ) { _description = description; }

		inline const Texture GetTexture( ) const { return _texture; }
		inline void SetTexture( const Texture& texture ) { _texture = texture; }

		inline const float GetMass( ) const { return _mass; }
		inline void SetMass( float mass ) { _mass = mass; }

		inline const float GetInertia( ) const { return _inertia; }
		inline void SetInertia( float inertia ) { _inertia = inertia; }

		inline const float GetFriction( ) const { return _friction; }
		inline void SetFriction( float friction ) { _friction = friction; }

		inline const float GetRestitution( ) const { return _restitution; }
		inline void SetRestitution( float restitution ) { _restitution = restitution; }

		inline void AddVertex( Circle vertex ) { _vertices->Add(vertex); }
		inline void RemoveVertex( Circle vertex ) { _vertices->Remove(vertex); }
		inline const IIterable<Circle>* GetVertices( ) const { return _vertices; }

	private:
		std::string _name;
		std::string _description;
		Texture _texture;
		float _mass;
		float _inertia;
		float _friction;
		float _restitution;

		Vector<Circle>* _vertices;
	};
}
#endif	/* DETAILDEF_H */

